<?php

declare (strict_types=1);
namespace App\Model;

use Hyperf\DbConnection\Model\Model;
use Hyperf\Cache\Annotation\Cacheable;
/**
 * @property int $id 
 * @property \Carbon\Carbon $created_at 
 * @property int $user_id 
 * @property string $money 
 * @property int $if_paid 
 */
class Order extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'orders';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'created_at' => 'datetime', 'user_id' => 'integer', 'if_paid' => 'integer'];

    /**
     * @Cacheable(prefix="order",ttl=7200, value="#{id}", listener="user-update")
     */
    public function getThree(int $id){
        return self::find($id);
    }
}